package com.agricultural.machine.chain;


public abstract class AbstractSafetyHandler implements SafetyHandler {
    protected SafetyHandler nextHandler;
    
    @Override
    public void setNext(SafetyHandler next) {
        this.nextHandler = next;
    }
    

    protected boolean handleNext(SafetyEvent event) {
        if (nextHandler != null) {
            return nextHandler.handle(event);
        }
        return false;
    }
}



